<?php
defined('IN_TS') or die('Access Denied.');

$giftid = intval($_GET['id']);

//福利信息
$strGift = $new['gift']->find('gift',array(
    'giftid'=>$giftid,
));

if($strGift==''){
    header ( "HTTP/1.1 404 Not Found" );
    header ( "Status: 404 Not Found" );
    $title = '404';
    include pubTemplate ( "404" );
    exit ();
}


if($strGift['isaudit']==1 && $TS_USER['isadmin']==0 || $strGift['isaudit']==1 && $strGift['userid']!=$TS_USER['userid'] && $TS_USER['isadmin']==0){
    tsNotice('商品审核中...');
}

$strGift['title'] = tsTitle($strGift['title']);
$strGift['address'] = tsTitle($strGift['address']);
$strGift['content'] = tsDecode($strGift['content']);
$strGift['coordinate'] = tsTitle($strGift['coordinate']);

$strGift['user'] = aac('user')->getOneUser($strGift['userid']);

$strGift['type'] = $new['gift']->find('gift_type',array(

    'typeid'=>$strGift['typeid'],

));

$cover =tsXimg($strGift['photo'],'gift',500,'',$strGift['path']);
// 是否点赞



if(!$strGift['cate']){
    $text='给微澜志愿者的福利：';
}else{
    $text = '为微澜图书馆义卖：';
}

$title = $text.$strGift['title'];
include template("notice");